package Association_rules;

import java.util.ArrayList;
import java.util.List;
public class Node<T> {
    private T cont;//节点内容
    private int count=1;//节点计数
    public int depth=1;//节点的深度
    private Node<T> parent;//父节点
    public List<Node<T>> nodeList;//子节点列表
    //构造函数
    public Node(T cont) {
        super();
        this.cont = cont;
        this.parent = null;
        this.nodeList = new ArrayList<Node<T>>();
    }
    public Node(T cont,int count) {
        super();
        this.cont = cont;
        this.count=count;
        this.parent = null;
        this.nodeList = new ArrayList<Node<T>>();
    }
    public Node(T cont,int count,int depth) {
        super();
        this.cont = cont;
        this.count=count;
        this.depth=depth;
        this.parent = null;
        this.nodeList = new ArrayList<Node<T>>();
    }
    public Node() {
        super();
    }
    public void setDepth(int depth){
        this.depth=depth;
    }
    public void addCount(int count){
        this.count+=count;
    }
    public void setCount(int count){
        this.count=count;
    }
    public int getCount(){
        return this.count;
    }
    public T getCont() {
        return cont;
    }
    public void setCont(T cont) {
        this.cont = cont;
    }
    public Node<T> getParent() {
        return parent;
    }
    public void setParent(Node<T> parent) {
        this.parent = parent;
    }
    public List<Node<T>> getNodeList() {
        return nodeList;
    }
    public void setNodeList(List<Node<T>> nodeList) {
        this.nodeList = nodeList;
    }
}

